import requests
import re
# --------------- 直接给接口添加构造好的 cookie  ---------------
# cookie 添加
# 构造 url
url = r'http://localhost:8080/bsams/front/asset_user/user_info.do'
# 构造 cookies
cookies = {'JSESSIONID': 'C70279CB7C72C70CE59D1B5BC275C480'}
resp = requests.get(url, cookies=cookies)
patt = r'<title>(.*?)</title>'
title = re.findall(patt, resp.text)
print(title)
